package com.itheima.String;

import com.itheima.domain.Student;

import java.util.Scanner;

public class Testsplit {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息");
        String stu = sc.next();
        //注意 当切割的字符为.时 要改成\\.才能实现切割.
        String[] sArr = stu.split(",");

        Student s = new Student(sArr[0],sArr[1]);
        //调用get方法取出数据
        System.out.println(s.getName()+"..."+s.getAge());
    }
}
